package ua.mk.chdu.rtem.diploma.core.utils;

import jade.lang.acl.ACLMessage;
import jade.lang.acl.UnreadableException;

public class MessageContentExtractor<T> {
    public T extract(ACLMessage message) {
        try {
            Object content = message.getContentObject();
            return content != null ? (T) content : null;
        } catch (UnreadableException e) {
            return null;
        }
    }
}
